{// 引入标签库 }
<tagLib name="html" />
<include file="Public:header" />
<include file="Public:new" />
<load href='__TMPL__Common/js/jquery.bgiframe.js' />
<load href='__TMPL__Common/js/jquery.weebox.js' />
<load href='__TMPL__Common/js/user.js' />
<load href='__TMPL__Common/js/deal.js' />
<load href='__TMPL__Common/style/weebox.css' />
<script type="text/javascript" src="__TMPL__Common/js/calendar/calendar.php?lang=zh-cn" ></script>
<load href='__TMPL__Common/js/calendar/calendar.css' />
<load href='__TMPL__Common/js/calendar/calendar.js' />

<div class="main">
    <div class="main_title_list"><div class="list-line-ico"></div>会员盈亏报表</div>
    <div class="search_row">
        <form name="search" action="__APP__" method="get" class="clearfix">
            <div>时间:
            	<input type="text" class="textbox" name="begin_time" id="begin_time" onfocus="this.blur(); return showCalendar('begin_time', '%Y-%m-%d', false, false, 'btn_begin_time');" value="{$begin_time}"/>
                <input type="button" class="button" id="btn_begin_time" value="{%SELECT_TIME}" onclick="return showCalendar('begin_time', '%Y-%m-%d', false, false, 'btn_begin_time');" />
                <span>-</span> 
                <input type="text" class="textbox" name="end_time" id="end_time" onfocus="this.blur(); return showCalendar('end_time', '%Y-%m-%d', false, false, 'btn_end_time');" value="{$end_time}" value="{$end_time}"/>
                <input type="button" class="button" id="btn_end_time" value="{%SELECT_TIME}" onclick="return showCalendar('end_time', '%Y-%m-%d', false, false, 'btn_end_time');" />
            </div>
            <div>会员ID:<input type="text" class="textbox" name="id" value="{:trim($_REQUEST['id'])}"></div>
            <div>机构编号：<input type="text" class="textbox" name="login_name" value="{:trim($_REQUEST['login_name'])}">          </div>
            <div>模糊机构编号：<input type="text" class="textbox" name="login_name1" value="{:trim($_REQUEST['login_name1'])}">          </div>
            <div>业务员ID:<input type="text" class="textbox" name="bm_qrcode_id" value="{:trim($_REQUEST['bm_qrcode_id'])}"></div>
            <input type="hidden" value="BmUserEarningst" name="m" />
            <input type="hidden" value="index" name="a" />
            <input type="submit" class="button" value="{%SEARCH}" />
            <input type="button" class="button" value="{%EXPORT}" onclick="export_csv();" />
        </form>
    </div>
    汇总：<span style="padding-right:10px;">会员游戏盈亏 {$total.sum_user_gain} </span><span style="padding-right:10px;">平台留存手续费{$total.total_platform_gain} </span><span style="padding-right:10px;">{$bm_one}留存手续费{$total.total_promoter_gain} </span><span style="padding-right:10px;">{$bm_two}客损{$total.total_gain} </span>
    <br/><br/>
<html:list
    id="dataTable"
    style="dataTable"
    name="user"
    datasource="list"
    show="id:会员ID
    ,nick_name:会员名称
    ,user_gain:会员游戏盈亏
    ,platform_gain:平台留存手续费
    ,promoter_gain:{$bm_one}留存手续费
    ,gain:{$bm_two}客损
    ,bm_pid_login_name:所属{$bm_two}编号
    ,bm_promoter_login_name:所属代理商编号
    ,bm_qrcode_id:所属业务员ID
    "/>
<div class="page">{$page}</div>
</div>
<script>
	$("#dataTable").find("th a").each(function(){
		if($.trim($(this).html())=='所属代理商编号')
		{
			$(this).parents("th").html($(this).html());
		}
	});
</script>
<include file="Public:footer" />